package com.link2room.bumblebee;

import com.link2room.base.facade.IMappingServiceCacheFacadeService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * 加载mappingDescription信息到redis中
 * Created by LN on 2016/8/25.
 */
@Component
public class LoadServiceInfoRedisRunner implements CommandLineRunner {

    @Resource
    private IMappingServiceCacheFacadeService mappingServiceCacheFacadeService;
    private static Logger logger = LoggerFactory.getLogger(LoadServiceInfoRedisRunner.class);
    @Override
    public void run(String... strings) throws Exception {
        logger.info("###加载MappingDescription###");
        mappingServiceCacheFacadeService.cache();
    }
}
